import * as Cesium from 'cesium';

class PoiLayer {
  constructor(viewer) {
    this.viewer = viewer;
    if (window.Worker) {
      this.myWorker = new Worker('worker.js');
      this.myWorker.postMessage({ x: 10, y: 20 });
    }
  }
  // 发送请求加载GeoJson的POI数据
  loadPoiData () {
    this.myWorker.onmessage = function (e) {
      var points = e.data;
      console.log('来自worker回写的数据:', points);
    };
  }
}

export default PoiLayer;
